package com.codedef.controller;

import com.codedef.service.BloomCacheManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 孙宏宇
 * @date 2021/3/13 15:53
 */
@RestController
@RequestMapping("/bloomCache")
public class BloomCacheController {

    @Autowired
    BloomCacheManager bloomCacheManager;

    @GetMapping("/f/setSeatState")
    public String setSeatStateFeign(@RequestParam("abbreviation") String abbreviation, @RequestParam("seatId") Integer seatId, @RequestParam("state") Integer state) {
        bloomCacheManager.setSeatState(abbreviation, seatId, state);
        return "SUCCESS";
    }

}
